FROM centos:7

MAINTAINER joen kai168@126.com

ENV ETH_VERSION 1.8.2
ENV MIST_VERSION 0.9.3

RUN curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

RUN set -ex; \
      yum update -y; \
      yum install -y get wget bzip2 make; \
      yum install golang -y;
RUN set -ex; \
      cd /usr/local/src; \
      curl -fSL -o go-ethereum-$ETH_VERSION.tar.gz https://github.com/ethereum/go-ethereum/archive/v$ETH_VERSION.tar.gz; \
      tar xzf go-ethereum-$ETH_VERSION.tar.gz; \
      cd go-ethereum-$ETH_VERSION/; \
      # git clone https://github.com/ethereum/go-ethereum.git; \
      # cd go-ethereum/; \
      gmake all; \
      mv build /srv/go-ethereum; \
      # echo "export PATH=$PATH:/srv/go-ethereum/bin" >> /etc/profile; \
      ln -s /srv/go-ethereum/bin/* /usr/bin

# https://github.com/ethereum/mist/archive/v0.9.3.tar.gz
